local assets =
{
    Asset("ANIM", "anim/doro_orange.zip")
}

local prefabs =
{
}
local function fn()
    local inst = CreateEntity()

    inst.entity:AddTransform()
    inst.entity:AddAnimState()
    inst.entity:AddNetwork()

    MakeInventoryPhysics(inst)

    inst.AnimState:SetBank("doro_orange")
    inst.AnimState:SetBuild("doro_orange")
    inst.AnimState:PlayAnimation("idle")

    inst.pickupsound = "vegetation_firm"

    inst:AddTag("cattoy")
    inst:AddTag("nosteal")

    MakeInventoryFloatable(inst, "small", 0.03)

    inst.entity:SetPristine()

    if not TheWorld.ismastersim then
        return inst
    end

    inst:AddComponent("edible") -- 食物，属性500饱食度50理智1血量
    inst.components.edible.healthvalue = 1
    inst.components.edible.hungervalue = 500
    inst.components.edible.sanityvalue = 50
    inst.components.edible.foodtype = FOODTYPE.VEGGIE

    inst:AddComponent("stackable")
    inst.components.stackable.maxsize = TUNING.STACK_SIZE_SMALLITEM

    inst:AddComponent("inspectable")
    inst:AddComponent("inventoryitem")

    inst:AddComponent("tradable")

    inst:AddComponent("perishable")
    inst.components.perishable:SetPerishTime(20 * 8 * 60)
    inst.components.perishable:StartPerishing()
    inst.components.perishable.onperishreplacement = "spoiled_food"

    MakeHauntableLaunchAndPerish(inst)

    return inst
end

return Prefab("doro_orange", fn, assets, prefabs)
